package com.jbp.controller;

import java.util.Arrays;
import java.util.Map;


import com.jbp.model.PrizeDeploy;
import com.jbp.service.PrizeDeployService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.jbp.utils.PageUtils;
import com.jbp.utils.R;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 奖池配置表
 *
 * @author lucheng feng
 * @email retailers@gmail.com
 * @date 2020-06-26 13:49:51
 */
@Api(hidden = true)
@ApiIgnore
@RestController
@RequestMapping("/rest/prizedeploy")
public class PrizeDeployController {
    @Autowired
    private PrizeDeployService prizeDeployService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = prizeDeployService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
        PrizeDeploy prizeDeploy = prizeDeployService.getById(id);

        return R.ok().put("prizeDeploy", prizeDeploy);
    }



}
